-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Lots of automated migrations to Symfony Flex structure #8569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -364,8 +364,7 @@ routes with UTF-8 characters: | |||
|
|||
.. code-block:: php-annotations | |||
|
|||
// src/AppBundle/Controller/DefaultController.php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to keep such comments? We can probably automatically just strip the AppBundle directory. The new one would be src/Controller/DefaultController.php
in that case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I changed it everywhere, but we're in the components section, we shouldn't talk about framework conventions here. (probably, this needs to be extracted to its own subguide).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, makes sense.
bundles/override.rst
Outdated
@@ -26,7 +26,7 @@ Routing | |||
|
|||
Routing is never automatically imported in Symfony. If you want to include | |||
the routes from any bundle, then they must be manually imported from somewhere | |||
in your application (e.g. ``app/config/routing.yml``). | |||
in your application (e.g. ``app/config/routes.yaml``). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config/routes.yaml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted this change, the whole paragraph needs to be rewritten (and thus done in a non-automatic PR).
console.rst
Outdated
@@ -229,9 +227,9 @@ class. It uses special input and output classes to ease testing without a real | |||
console:: | |||
|
|||
// tests/AppBundle/Command/CreateUserCommandTest.php | |||
namespace Tests\AppBundle\Command; | |||
namespace Tests\App\Command; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
App\Tests
everywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed (every other occurence of this as well)
form/form_dependencies.rst
Outdated
@@ -105,23 +105,23 @@ manually and tag it with ``form.type``: | |||
|
|||
.. code-block:: yaml | |||
|
|||
# src/AppBundle/Resources/config/services.yml | |||
# src/Resources/config/services.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should refer to config/services.yaml
? same for other formats.
http_cache.rst
Outdated
use Symfony\Component\HttpFoundation\Request; | ||
|
||
// ... | ||
$kernel = new AppKernel('prod', false); | ||
$kernel = new Kernel('prod', false); | ||
$kernel->loadClassCache(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line is obsolete?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted, all front controller and kernel changes should be done manually.
@@ -148,14 +148,14 @@ and adding a priority. | |||
|
|||
.. code-block:: yaml | |||
|
|||
# app/config/services.yml | |||
# app/config/services.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config/*
everywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done for all services and routes files, the remaining onces need all be visited manually.
deployment/azure-website.rst
Outdated
@@ -294,7 +294,7 @@ below: | |||
|
|||
The code of the Symfony application has now been deployed to the Azure Website | |||
which you can browse from the file explorer of the Kudu application. You should | |||
see the ``app/``, ``src/`` and ``web/`` directories under your ``site/wwwroot`` | |||
see the ``app/``, ``src/`` and ``public/`` directories under your ``site/wwwroot`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"see the ``config/``, ..."
@@ -126,7 +126,7 @@ matter), Symfony uses the standard ``render`` helper to configure ESI tags: | |||
|
|||
.. code-block:: twig | |||
|
|||
{# app/Resources/views/static/about.html.twig #} | |||
{# templates/static/about.html.twig #} | |||
|
|||
{# you can use a controller reference #} | |||
{{ render_esi(controller('AppBundle:News:latest', { 'maxPerPage': 5 })) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
App\Controller\NewsController::latestAction
use FQNC notation everywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's change that in a manual PR as well (not so easy to automate)
security/csrf_in_login_form.rst
Outdated
@@ -132,7 +132,7 @@ using the login form: | |||
|
|||
.. code-block:: html+twig | |||
|
|||
{# src/AppBundle/Resources/views/Security/login.html.twig #} | |||
{# src/Resources/views/Security/login.html.twig #} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this templates should be moved to templates/
?
@@ -459,10 +459,10 @@ to service ids that may not exist yet: ``AppBundle\Security\Authentication\Provi | |||
Now that your services are defined, tell your security context about your | |||
factory in your bundle class:: | |||
|
|||
// src/AppBundle/AppBundle.php | |||
// src/AppBundle.php | |||
namespace AppBundle; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both lines should be updated, probably this code lives now in Kernel.php
.
Thanks a lot for your detailed review @yceruto ! I've now fixed everything or reverted the change as they have to be done in another PR (to not make this too big and hard to merge). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
service_container.rst
Outdated
@@ -1067,5 +1067,5 @@ Learn more | |||
/service_container/* | |||
|
|||
.. _`service-oriented architecture`: https://en.wikipedia.org/wiki/Service-oriented_architecture | |||
.. _`Symfony Standard Edition (version 3.3) services.yaml`: https://github.com/symfony/symfony-standard/blob/3.3/app/config/services.yaml | |||
.. _`Symfony Standard Edition (version 3.3) services.yaml`: https://github.com/symfony/symfony-standard/blob/3.3/config/services.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be reverted or referenced to the recipe instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed
7064286
to
57baceb
Compare
Applied the comment and also fixed the build |
|
||
use App\DependencyInjection\Security\Factory\WsseFactory; | ||
use Symfony\Component\HttpKernel\Bundle\Bundle; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add use Symfony\Component\HttpKernel\Kernel as BaseKernel
?
YES, awesome! Thank you Wouter! Thanks to the review from @yceruto, I'm happy to merge this quickly. If we find any bugs, we can make sure to automate those "fixes" across everything. So I think merging this right now is a great idea :) |
…(wouterj) This PR was squashed before being merged into the master branch (closes #8569). Discussion ---------- Lots of automated migrations to Symfony Flex structure Almost all of these changes need a check if the paragraphs surrounding the code block still make sense, but at least, it is a start. I skipped the Best Pratices and Create Your Own Framework guides. Both of these need to be completely revisited. Also, lots of other (configuration, bundles, controller and services) guides need to be checked carefully. Please review and merge quickly @symfony/team-symfony-docs Commits ------- 57baceb Fixed build failures 6853f61 Some manual tweaks to the automated migrations 9e5cd17 Lots of automated migrations to Symfony Flex structure
Almost all of these changes need a check if the paragraphs surrounding the code block still make sense, but at least, it is a start.
I skipped the Best Pratices and Create Your Own Framework guides. Both of these need to be completely revisited.
Also, lots of other (configuration, bundles, controller and services) guides need to be checked carefully.
Please review and merge quickly @symfony/team-symfony-docs